﻿using System;
using System.Globalization;
using System.IO;
using System.Windows.Data;

namespace MyPublisher.Administration.Primitives
{
    public class FileNameConverter : IMultiValueConverter
    {
        private static FileNameConverter defaultInstance = new FileNameConverter();

        public static FileNameConverter Default { get { return defaultInstance; } }
        
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            string name = (string)values[0];
            bool modified = (bool)values[1];
            return (name + (modified ? "*" : "")).PadRight(10,' ');
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
